﻿using HK.Core.Common.Data;
using HK.Editor.GUIEx.Protocol.TreeView.Data;
using HK.Editor.GUIEx.TreeView.Control;
using UnityEditor.IMGUI.Controls;
using UnityEngine;

namespace HK.Editor.GUIEx.Protocol.TreeView.Control
{

    /// <summary>
    /// 事件委托定义 : TableTree排序
    /// </summary>
    /// <param name="iHeaderColumns">头部列</param>
    /// <param name="iRoot">根节点</param>
    public delegate void SortTableTree(MultiColumnHeader iHeaderColumns, TreeViewItem iRoot);
    
    /// <summary>
    /// 接口 : 表树 - 多列
    /// </summary>
    /// <typeparam name="TBranch">树形数据类型</typeparam>
    public interface IMultiColTableTree<TBranch> : ITableTree<TreeViewRow<TBranch>, TBranch>
        where TBranch : JsonData, ITreeBranch
    {
        /// <summary>
        /// 列数
        /// </summary>
        int ColumnCount { get; }

        
#region Draw

        /// <summary>
        /// 绘制自身
        /// </summary>
        /// <param name="iRect">制矩形范围</param>
        /// <param name="iEvent">Event</param>
        /// <returns>制矩形范围</returns>
        Rect DrawSelf(Rect iRect, Event iEvent);

#endregion

    }
}
